//教师打卡记录
$(document).ready(function(){
	var d=new Date();
	$('#dayValue').val(d.getFullYear() + "-" + appendZero(d.getMonth() + 1) + "-" + appendZero(d.getDate()));
	$('#dayValueTea').val(d.getFullYear() + "-" + appendZero(d.getMonth() + 1) + "-" + appendZero(d.getDate()));
	$('#monthTea').val(d.getFullYear() + "-" + appendZero(d.getMonth() + 1));
	
	var dayValue = $('#dayValueTea').val();
	$("#tea_inOutParkInfo").jqGrid({
		url:global_url+global_urijs+'schooliccard_searchTIIList'+global_suffix+"?sid="+global_sid+"&dayValue="+dayValue,                
		datatype:"json",                
		mtype:'GET', 
		height:'360',
		width:'660',
		colNames:['教师姓名','上午进园','上午出园','下午进园','下午出园'],                
		colModel:[                    
		{name:'name',index:'name',width:100,align:'center', sortable:false},                    
		{name:'am_in',index:'am_in',width:100,align:'center', sortable:false},
		{name:'am_out',index:'am_out',width:100,align:'center', sortable:false},
		{name:'pm_in',index:'pm_in',width:100,align:'center', sortable:false},
		{name:'pm_out',index:'pm_out',width:100,align:'center', sortable:false}
		],
		//autowidth:true,
		jsonReader: {
			root:"stuIcardInfList",
			page: "page",
			total: "page_count",
			records : "count",
			repeatitems: false
		},
		pager: jQuery('#tea_inOutParkPage'),
		prmNames : {page:"page",sort: "sort"},
		rowNum: 10,
		//rowList: [10, 20, 30],
		sortname: 'cdate_str',
		hidegrid: false,
		sortorder: 'desc',
		viewrecords: true,
		caption: '教师打卡记录',
		gridComplete:function(){
		}
	}).navGrid("#tea_inOutParkPage", { edit: false, add: false, del: false, search: false });
});


// 学生打卡记录
function showStuRecord() {
	var cid = $('#classid  option:selected').val();
	var dayValue = $('#dayValue').val();
	
	$("#inOutParkInfo").jqGrid({
		url:global_url+global_urijs+'schooliccard_searchUIIList'+global_suffix+"?sid="+global_sid+"&dayValue="+dayValue+"&cid="+cid,                
		datatype:"json",                
		mtype:'GET', 
		height:'360',
		width:'660',
		colNames:['学生姓名','上午进园','上午出园','下午进园','下午出园'],                
		colModel:[                    
		{name:'name',index:'name',width:100,align:'center', sortable:false},                    
		{name:'am_in',index:'am_in',width:100,align:'center', sortable:false},
		{name:'am_out',index:'am_out',width:100,align:'center', sortable:false},
		{name:'pm_in',index:'pm_in',width:100,align:'center', sortable:false},
		{name:'pm_out',index:'pm_out',width:100,align:'center', sortable:false}
		],
		//autowidth:true,
		jsonReader: {
			root:"stuIcardInfList",
			page: "page",
			total: "page_count",
			records : "count",
			repeatitems: false
		},
		pager: jQuery('#inOutParkPage'),
		prmNames : {page:"page",sort: "sort"},
		rowNum: 10,
		//rowList: [10, 20, 30],
		sortname: 'cdate_str',
		hidegrid: false,
		sortorder: 'desc',
		viewrecords: true,
		caption: '学生打卡记录',
		gridComplete:function(){
		}
	}).navGrid("#inOutParkPage", { edit: false, add: false, del: false, search: false });
}
